package cn.iocoder.yudao.module.indicator.domain.entity;

import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author ZYW
 * @description: TODO
 * @date 2024-01-22 11:40
 */
@Data
@TableName("WARN_RULE")
public class WarnRule extends TenantBaseDO {
    @TableId(value = "ID")
    private Long id;

    @TableField("TRIGGER_STYLE")
    @Schema(description = "触发方式1.绝对值变值化，2.百分比变化")
    private String triggerStyle;

    @TableField("THRESHOLD")
    @Schema(description = "固定值，如果是区间的，逗号风格传入")
    private String threshold;

    @TableField("SYMBOL")
    @Schema(description = "符号(低于 高于 区间在 区间不在 )")
    private String symbol;

    @TableField("MIN_VALUE")
    @Schema(description = "最小值")
    private String minValue;

    @TableField("MAX_VALUE")
    @Schema(description = "最大值")
    private String maxValue;

    @TableField("LEVEL_DEGREE")
    @Schema(description = "【预警等级维护表】严重/较重/一般/正常/满分")
    private String levelDegree;

    @TableField("WARN_STYLE_ID")
    @Schema(description = "预警指标表id")
    private Long warnStyleId;

    @TableField("THRESHOLD_STYLE")
    @Schema(description = "同比/环比/特定值（只有低于或者高于的时候有）")
    private String thresholdStyle;

    @TableField("TARGET_AUDIENCE")
    @Schema(description = "作用对象（全院/科室）")
    private String targetAudience;

    @TableField("NOTICE_ROLE")
    @Schema(description = "通知角色")
    private String noticeRole;


    @TableField("NOTICE_CONTENT")
    @Schema(description = "通知内容")
    private String noticeContent;

    @TableField(exist = false)
    private String[] ruleDept;

    @TableField(exist = false)
    private String targetValue;

}
